/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rationalsheet.parser.operation.function;

import org.rationalsheet.parser.type.Type;

/**
 *
 * @author Overmind
 */
public abstract class Function1Arguments<R, A1>
    extends Function
{

    public Function1Arguments(String name, Type resultType, Type arg1Type)
    {
        super(name, resultType, new Type[]
            {arg1Type});
    }

    @Override
    protected Object calculateOfObjects(Object[] arguments)
    {
        return calculate((A1)arguments[0]);
    }
    
    public abstract R calculate(A1 arg1);
    
}
